
import java.util.Scanner;

public class Main {

    private static Scanner consola = new Scanner(System.in);
    private static StringBuffer s = new StringBuffer();
    private static int x,  y,  p,  c,  mayor,  temp;

    public static void main(String args[]) {
        while (consola.hasNextInt()) {
            s.append(x = consola.nextInt()).append(" ");
            s.append(y = consola.nextInt()).append(" ");
            mayor = 0;
            if (x > y) {
                temp = x;
                x = y;
                y = temp;
            }
            for (int i = x; i <= y; i++) {
                c = 1;
                p = i;
                while (p > 1) {
                    if (p % 2 == 0) {
                        p /= 2;
                    } else {
                        p = 3 * p + 1;
                    }
                    c++;
                }
                if (c > mayor) {
                    mayor = c;
                }
            }
            s.append(mayor).append("\n");
        }
        System.out.print(s);
    }
}